Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects / Colors and Color-Related Objects Reference
Color Set Functions / Retrieving and Replacing Colors in a Color Set


GXSetColorSet

You can use the GXSetColorSet function to replace the color values of a color set object.

void GXSetColorSet(gxColorSet target, gxColorSpace space, 
                  long count, const gxSetColor colors[]);
target
A reference to the color set object whose color values you want to replace.
space
The new color space for the color set referenced in the target parameter.
count
The number of color values in the colors array.
colors
The array of color values to assign to the color set.
DESCRIPTION
The GXSetColorSet function assigns the specified color space and color values to the target color set. If gxNoSpace is passed in the space parameter, the color space is unchanged. If the colors array is nil and if count is zero, the color set remains unchanged.

SPECIAL CONSIDERATIONS
If you attempt to modify the color values of a color set object used by an onscreen view device, this function posts a colorSet_access_restricted warning.

The current implementation of QuickDraw GX restricts the number of colors in a color set to a maximum of 65,535.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
colorSet_is_nil
inconsistent_parameters(debugging version)
count_is_less_than_zero(debugging version)
colorSpace_out_of_range(debugging version)
number_of_colors_exceeds_implementation_limit
Warnings 
colorSet_access_restricted(debugging version)
SEE ALSO
To retrieve the entire array of color values from a color set object, use the GXGetColorSet function, described in the previous section. To retrieve some of the color values in a color set object, use the GXGetColorSetParts function, described
in the next section. To replace some of the color values in a color set object, use the GXSetColorSetParts function, described on page 4-76.

The gxSetColor union is described on page 4-56.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996